package com.AuthServer.service;

import com.AuthServer.common.Result;
import com.AuthServer.pojo.entity.Teacher;
import com.AuthServer.pojo.entity.User;
import com.AuthServer.pojo.form.*;
import com.AuthServer.pojo.query.UserQuery;
import com.AuthServer.pojo.vo.UserInfoVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import jakarta.mail.internet.AddressException;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;

public interface UserService extends IService<User> {
    Result<String> login(LoginForm loginForm) throws JsonProcessingException;
    Result<String> getGraphicalCaptcha(String userId) throws IOException;
    Result<?> getEmailCaptcha(String email) throws UnsupportedEncodingException, AddressException;
    Result<String> verifyInfo(VerifyInfoForm verifyInfoForm, Teacher teacher);
    Result<String> bindEmail(EmailForm emailForm);
    Result<?> setPassword(PasswordForm passwordForm);

    Result<?> updatePassword(UpdatePasswordForm updatePasswordForm) throws JsonProcessingException;

    Result<?> getUserList(Long pageNumber, Long pageSize);

    Result<?> getUserPerm(String userId);

    Result<?> getPerm();

    Result<?> addUserPerm(String userId,Integer[] permIds);

    Result<?> deleteUserPerm(String userId,Integer[] permIds);

    Result<UserInfoVo> getOneByUserId(String userId);

    Result<?> updateStatus(String userId, String status);

    Result<?> searchUserList(UserQuery userQuery);

    Result<?> removeUserById(String userId);

    Result<?> removeBatchUsers(List<String> userIds);

    Result<?> bindEmailCaptcha(BindCodeForm bindCodeForm);

    Result<?> verifyEmail(BindEmailForm bindEmailForm) throws JsonProcessingException;

}
